//
//  PigMarketApi.h
//  PigMarket
//
//  Created by Felix on 2019/4/11.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "URLPigMarketDefine.h"
#import "PigMarketModel.h"
#import "PigMarketRequest.h"
#import "LoginAccountModel.h"



typedef NS_ENUM(NSInteger, VerifyCodeType)
{
    VerifyCodeTypeBinding = 0,
    VerifyCodeTypeLogin = 1,
    VerifyCodeTypeModifyPassword = 2
};


typedef NS_ENUM(NSInteger, UpDateImageType)
{
    UpDateImageType_Header = 1,
    UpDateImageType_Photo = 2,
    UpDateImageType_Other = 0
};


@interface PigMarketApi : NSObject

+ (instancetype) sharedInstance;

#pragma mark - 登录
- (RACSignal<UserInfo *> *)userLoginWithAccount:(NSString *)account
                                        msgCode:(NSString *)msgCode
                                      loginType:(NSNumber *)loginType;
#pragma mark - 获取验证码
- (RACSignal<GetMessageCode *> *)getMessageCodeWithParam:(GetMessageCodeParam *)param;

#pragma mark - 注册
- (RACSignal<UserInfo *> *)userRegisterWithAccount:(NSString *)account
                                        verifyCode:(NSString *)verifyCode;

#pragma mark - 三方注册
- (RACSignal<UserInfo *> *)userThirdRegisterWithAccount:(NSString *)account
                                        verifyCode:(NSString *)verifyCode
                                               wechatId:(NSString *)wechatId
                                                   qqId:(NSString *)qqId
                                                 sinaId:(NSString *)sinaId;

#pragma mark - 邀请人列表
- (RACSignal<SelectInviterList *> *)getSelectInviterListWithLongitude:(NSString *)longitude
                                                           latitude:(NSString *)latitude;
#pragma mark - 选择邀请人邀请码
- (RACSignal <NSNull *> *)userSelectInviteCodeWithCode:(NSString *)code
                                               account:(NSString *)account;

#pragma mark - 完善个人资料
- (RACSignal <NSNull *> *)userPersonalInformationWithParam:(PersonalInformationParam *)param;


#pragma mark - 上传图片
- (RACSignal<PhotosList *> *)uploadPhotosWithPhotosArr:(NSMutableArray *)photoArr
                                               account:(NSString *)account
                                                  type:(UpDateImageType) type;

#pragma mark - 设置密码
- (RACSignal <NSNull *> *)userSetUpPasswordWithAccount:(NSString *)account
                                              password:(NSString *)password;

#pragma mark - 获取意见反馈标签列表
-(RACSignal <ComplaintFeedbackList *> *)getCompaintFeedbackList;

#pragma mark - 提交获取意见反馈
-(RACSignal <NSNull *> *)commitComplaintFeedbackWith:(ComplaintFeedbackParam *)param;

#pragma mark - 注销
- (RACSignal <NSNull *> *)userAccountWriteOffWithMemberId:(NSNumber *)memberId;

#pragma mark - 修改密码
- (RACSignal <NSNull *> *)modifyPasswordWithMemberId:(NSNumber *)memberId
                                         oldPassword:(NSString *)oldPassword
                                         newPassword:(NSString *)newPassword;

#pragma mark - 获取实名认证信息
- (RACSignal <RealName *> *)getRealNameMessageWithMemberId:(NSNumber *)memberId;

#pragma mark - 邀请好友
- (RACSignal <InviteFriends *> *)inviteFriendsWithMemberId:(NSNumber *)memberId;

#pragma mark - 常见问题
- (RACSignal <CommonQuestionsList *> *)getCommonQuestionsWithQuestionType:(NSNumber *)questionType;

#pragma mark - 增加、编辑地址
- (RACSignal <AddressList *> *)getAddressListWithMemberId:(NSNumber *)memberId;

#pragma mark - 增加、编辑地址
- (RACSignal <NSNull *> *)addAddressWithParam:(AddressParam *)param;

#pragma mark - 编辑地址
- (RACSignal <NSNull *> *)editAddressWithParam:(AddressParam *)param;

#pragma mark - 删除地址
- (RACSignal <NSNull *> *)deleteAddressWithReceiveAddressId:(NSString *)receiveAddressId;

#pragma mark - 我的个人信息
- (RACSignal <UserDetailInfo *> *)getUserDetailInfoWithMemberId:(NSNumber *)memberId;

#pragma mark - 修改个人资料
- (RACSignal <NSNull *> *)modifyUserInfoWithParam:(PersonalInformationParam *)param;

#pragma mark - 获取照片
- (RACSignal <PhotosList *> *)getPhotosWithMemberId:(NSNumber *)memberId;

#pragma mark - 删除照片
- (RACSignal <NSNull *> *)deletephotoWithMemberId:(NSNumber *)memberId;

#pragma mark - 更新图片
- (RACSignal <NSNull *> *)updatePhotosWithMemberId:(NSNumber *)memberId
                                        imgNameArr:(NSMutableArray *)imgNameArr;

#pragma mark - 获取首页轮播
- (RACSignal <MessageList *> *)getAdoptBanner;

#pragma mark - 首页豚券消息
- (RACSignal <MessageList *> *)adoptMessageWithMemberId:(NSNumber *)memberId;

#pragma mark - 首页未领养猪的品种
- (RACSignal <PigVarietyList *> *)getPigVariety;

#pragma mark - 获取城市区域列表
- (RACSignal <SelectTribesList *> *)areasListWithParentId:(NSNumber *)parentId;

#pragma mark - 获取部落列表
- (RACSignal <SelectTribesList *> *)tribeListWithParentId:(NSNumber *)parentId;

#pragma mark - 猪的列表
- (RACSignal <AdoptList *> *)AdoptPigListWithParam:(AdoptParam *)param;

#pragma mark - 绑定和解绑
- (RACSignal <NSNull *> *)accountBindOrUnbindWithParam:(AccountBindParam *)param;

#pragma mark - 小猪领养详情
- (RACSignal <AdoptDetailList *> *)adoptDetailWithPigId:(NSNumber *)pigId
                                                tribeId:(NSNumber *)tribeId;

#pragma mark - 余额查询
- (RACSignal <Pay *> *)getBalanceWithMemberId:(NSNumber *)memberId;

#pragma mark - 支付
- (RACSignal <Pay *> *)payWithParam:(PayParam *)param;

#pragma mark - 充值
- (RACSignal <Pay *> *)topUpRequestWithParam:(TopUpMoneyParam *)param;

#pragma mark - 充值结果校验 --- 废弃---
- (RACSignal <Pay *> *)topUpResultWithMemberId:(NSNumber *)memberId
                                         money:(NSString *)money;

#pragma mark - 支付宝 微信支付
- (RACSignal <Pay *> *)thirdPayWithMemberId:(NSNumber *)memberId
                                      pigId:(NSNumber *)pigId;

#pragma mark - 获取用户豚券
- (RACSignal <DiscountCouponsList *> *)userDiscountCouponsWithParam:(DiscountCouponsParam *)param;

#pragma mark - 修改支付密码
- (RACSignal <NSNull *> *)modifyPayPasswordWithMemberId:(NSNumber *)memberId
                                                 payPwd:(NSString *)payPwd;

#pragma mark - 已领养列表
- (RACSignal <AdoptedList *> *)AdoptedListWithParam:(AdoptedParam *)param;

#pragma mark - 转让猪的信息
- (RACSignal <TransferInfo *> *)transferPigInfoWithAdoptPlanId:(NSNumber *)adoptPlanId;

#pragma mark - 确认转让
- (RACSignal <NSNull *> *)confirmTransferWithMemberId:(NSNumber *)memberId
                                        receiverPhone:(NSString *)receiverPhone
                                        transferMoney:(NSString *)transferMoney
                                                pigId:(NSNumber *)pigId;

#pragma mark - 转让管理
- (RACSignal <TransferManagerList *> *)transferManagerWithParam:(TransferManagerParam *)param;

#pragma mark - 撤销转让
- (RACSignal <NSNull *> *)cancelTransferWithAssignmentId:(NSNumber *)assignmentId;

#pragma mark - 接收
- (RACSignal <ReceivePigList *> *)receivePigWithMemberId:(NSNumber *)memberId;

#pragma mark - 拒绝 同意接收
- (RACSignal <NSNull *> *)receiveStatusWithAssignmentId:(NSNumber *)assignmentId
                                                   type:(NSNumber *)type
                                                payType:(NSNumber *)payType;

#pragma mark - 同意接收 支付前获取参数
- (RACSignal <Pay *> *)receivePigToGetThirdPayParamWithParam:(GetThirdPayParam *)param;

#pragma mark - 已领养套餐页面
- (RACSignal <AdoptedTrusteeList *> *)adoptedTrusteeWithAdoptPlanId:(NSNumber *)adoptPlanId;

#pragma mark - 已领养支付页面，获取头部数据、三方支付参数
- (RACSignal <Pay *> *)adoptedPayWithParam:(AdoptedPayParam *)param;

#pragma mark - 已领养 支付结果校验接口  -----   废弃
- (RACSignal <Pay *> *)checkAdoptedPayRequestWithAdoptPlanId:(NSNumber *)adoptPlanId
                                                    orderNum:(NSString *)orderNum;

#pragma mark - 获取部落范围的经纬度
- (RACSignal <TribeRangeList *> *)getTribeRange;

#pragma mark - 我的资产
- (RACSignal <MyAsset *> *)getMyAssetWithMemberId:(NSNumber *)memberId;

#pragma mark - 资产交易明细
- (RACSignal <TransicationDetailList *> *)tracnsicationDetailWithParam:(TransicationDetailParam *)param;

#pragma mark - 提现
- (RACSignal <NSNull *> *)withdrawWithMemberId:(NSNumber *)memberId
                                         money:(NSString *)money
                                        payPwd:(NSString *)payPwd;

#pragma mark - 提现  支付宝账号
- (RACSignal <NSNull *> *)alipayAccountWithMemberId:(NSNumber *)memberId
                                            account:(NSString *)account
                                               code:(NSString *)code
                                              money:(NSString *)money;

#pragma mark - 支付密码校验
- (RACSignal <NSNull *> *)checkPayPasswordWithMemberId:(NSNumber *)memberId
                                                payPwd:(NSString *)payPwd;

#pragma mark - 支付宝历史提现账号记录
- (RACSignal <WithdrawAlipayAccountHistoryRecord *> *)getWithdrawAlipayAccoutnHistoryRecordWithMemberId:(NSNumber *)memberId;

#pragma mark - 获取用户标签
- (RACSignal <UserTagsList *> *)getUserTags;

#pragma mark - 我的好友列表
- (RACSignal <FriendsList *> *)myFriendsListWithMemberId:(NSNumber *)memberId
                                                nickName:(NSString *)nickName currentPage:(int)page;

#pragma mark - 附近豚友
- (RACSignal <NearbyFriendsList *> *)nearbyFriendsWithParam:(NearbyFriendsParam *)param;

#pragma mark - 同意添加好友
- (RACSignal <NSNull *> *)agreeAddFriendWithFromMemberNum:(NSString *)fromMemberNum
                                              toMemberNum:(NSString *)toMemberNum;

#pragma mark - 搜索好友添加
- (RACSignal <SearchAddFriendList *> *)searchAddFriendWithSearchText:(NSString *)searchText;

#pragma mark - 聊天获取个人资料
- (RACSignal <ChatUserInfo *> *)getChatUserInfoWithMemberNum:(NSString *)memberNum
                                                 myMemberNum:(NSString *)myMemberNum;

#pragma mark - 删除好友
- (RACSignal <NSNull *> *)deleteChatFriendWithMemberId:(NSNumber *)memberId
                                              friendId:(NSNumber *)friendId;

#pragma mark - 添加黑名单
- (RACSignal <NSNull *> *)addBlackListWithMyMemberNum:(NSString *)myMemberNum
                                            memberNum:(NSString *)memberNum;

#pragma mark - 删除黑名单
- (RACSignal <NSNull *> *)deleteBlackListWithMyMemberNum:(NSString *)myMemberNum
                                            memberNum:(NSString *)memberNum;

#pragma mark - 修改好友备注
- (RACSignal <NSNull *> *)modifyFriendNameWithMemberId:(NSNumber *)memberId
                                             memberNum:(NSString *)memberNum
                                              noteName:(NSString *)noteName;

#pragma mark - 删除群成员
- (RACSignal <NSNull *> *)deleteGroupMemberWithGroupId:(NSString *)groupId
                                            memberList:(NSMutableArray *)memberList;

#pragma mark - 添加群成员
- (RACSignal <NSNull *> *)addGroupMemberWithGroupId:(NSString *)groupId
                                            memberList:(NSMutableArray *)memberList;

#pragma mark - 获取聊天投诉类型列表
- (RACSignal <ChatComplaintList *> *)getChatComplaint;

#pragma mark - 投诉
- (RACSignal <NSNull *> *)chatComplaintWithParam:(ChatComplaintParam *)param;

#pragma mark - 上传手机通讯录
- (RACSignal <NSNull *> *)uploadAddressBookWithFileName:(NSString *)fileName
                                                   file:(id)file;

#pragma mark - 看看他的详细信息
- (RACSignal <LookList *> *)getLookDetailInfoWithPigId:(NSNumber *)pigId;

#pragma mark - 发现页的广告
- (RACSignal <MessageList *> *)getDiscoveryAdvertising;

#pragma mark - 小猪档案
- (RACSignal <PigRecord *> *)pigRecordWithPigId:(NSNumber *)pigId
                                       memberId:(NSNumber *)memberId;

#pragma mark - 生长报告
- (RACSignal <GrowRecordAllList *> *)growRecordWithPigId:(NSNumber *)pigId;

#pragma mark - 生长报告详情
- (RACSignal <GrowRecordDetail *> *)growRecordDetailWithReportId:(NSNumber *)reportId;

#pragma mark - 同栏豚友
- (RACSignal <SamePenFriendList *> *)samePenFriendWithPigId:(NSNumber *)pigId
                                        memberId:(NSNumber *)memberId
                                            page:(int)page;

#pragma mark - 切换账号list接口
- (RACSignal <LoginAccountModel *> *)getLoginAccountList;


@end


